﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Groupbox="clr-namespace:Groupbox;assembly=Groupbox"
    xmlns:IControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" 
    xmlns:Controls="clr-namespace:FU.Capstones.IMS.Web.Silverlight.Controls"
    x:Class="FU.Capstones.IMS.Web.Silverlight.Controls.EmployeeSearchControl">

    <Groupbox:GroupBox Background="Transparent" >
        <Groupbox:GroupBox.Header>
            <TextBlock Text="Tìm kiếm" Style="{StaticResource TextBlockGroupBoxTitleStyle}"/>
        </Groupbox:GroupBox.Header>
        <Grid x:Name="LayoutRoot" Background="Transparent" ShowGridLines="False">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <!--Tên nhân viên-->
            <TextBlock
				x:Name="lblEmployeeName" 
				Grid.Row="0" Grid.Column="0"
                Style="{StaticResource TextBlockNormalStyle}"
				Text="{StaticResource EmployeeLabelText}"
			/>
            <TextBox
				x:Name="txtEmployeeName"
				Grid.Row="0" Grid.Column="1"
                Style="{StaticResource TextBoxNormalStyle}"
                Watermark="{Binding ElementName=lblEmployeeName, Path=Text}"
				Text="{Binding Path=EmployeeCriteria.FullNameSearch, Mode=TwoWay, ValidatesOnDataErrors=false}"
			/>

            <!--Mã nhân viên-->
            <!--<TextBlock 
				x:Name="lblEmployeeCode"
				Grid.Row="1" Grid.Column="0"
                Style="{StaticResource TextBlockNormalStyle}"
				Text="Mã nhân viên: "
			/>					
	    	<TextBox
				x:Name="txtEmployeeCode"
				Grid.Row="1" Grid.Column="1"
                Style="{StaticResource TextBoxNormalStyle}"
                Watermark="{Binding ElementName=lblEmployeeCode, Path=Text}"
				Text="{Binding Path=EmployeeCriteria.EmployeeCode, Mode=TwoWay}"
			/>-->

            <!--Chức vụ-->
            <TextBlock 
				Grid.Row="0" Grid.Column="2"
                Style="{StaticResource TextBlockNormalStyle}"
				Text="{StaticResource RoleLabelText}"
			/>
            <ComboBox
				x:Name="cbbRoleCollection"
				Grid.Row="0" Grid.Column="3"
                Style="{StaticResource ComboBoxNormalStyle}"
                ItemsSource="{Binding Path=RoleCollection, Mode=TwoWay}"
                DisplayMemberPath="RoleName"
				SelectedItem="{Binding Path = EmployeeCriteria.SelectedRole, Mode=TwoWay}"
			/>

            <!--Ngày vào công ty-->
            <TextBlock
				x:Name="lblJointDate" 
				Grid.Row="1" Grid.Column="0"
                Style="{StaticResource TextBlockNormalStyle}"
				Text="{StaticResource JoinedDateLabelText}"
			/>

            <!--Từ-->
            <TextBlock 
				x:Name="lblJointDateFrom"
				Grid.Row="2" Grid.Column="0"
                Style="{StaticResource TextBlockNormalStyle}"
                HorizontalAlignment="Right"
				Text="Từ"
			/>
            <IControls:RadDatePicker
				x:Name="txtJointDateFrom"
				Grid.Row="2" Grid.Column="1"
                Style="{StaticResource TelerikDatePickerNormalStyle}"                
				SelectedDate="{Binding Path=EmployeeCriteria.JoinedDateFrom, Mode=TwoWay,ValidatesOnDataErrors = true}"
			/>

            <!--Đến-->
            <TextBlock 
				x:Name="lblJointDateTo"
				Grid.Row="2" Grid.Column="2"
                Style="{StaticResource TextBlockNormalStyle}"
                HorizontalAlignment="Right"
				Text="Đến"
			/>
            <IControls:RadDatePicker
				x:Name="txtJointDateTo"
				Grid.Row="2" Grid.Column="3"                        
                Style="{StaticResource TelerikDatePickerNormalStyle}"
				SelectedDate="{Binding Path=EmployeeCriteria.JoinedDateTo, Mode=TwoWay,ValidatesOnDataErrors = true}"
			/>

            <!--Ngày sinh-->
            <TextBlock
				x:Name="lblDateOfBirth" 
				Grid.Row="3" Grid.Column="0"
                Style="{StaticResource TextBlockNormalStyle}"
				Text="{StaticResource DateOfBirthLabelText}"
			/>

            <!--Từ-->
            <TextBlock 
					x:Name="lblDateOfBirthFrom"
					Grid.Row="4" Grid.Column="0"
                    Style="{StaticResource TextBlockNormalStyle}"
                    HorizontalAlignment="Right"
					Text="Từ"
				/>
            <IControls:RadDatePicker
					x:Name="txtDateOfBirthFrom"
					Grid.Row="4" Grid.Column="1"
                    Style="{StaticResource TelerikDatePickerNormalStyle}"
				    SelectedDate="{Binding Path=EmployeeCriteria.DateOfBirthFrom, Mode=TwoWay,ValidatesOnDataErrors = true}"
				/>

            <!--Đến-->
            <TextBlock 
				x:Name="lblDateOfBirthTo"
				Grid.Row="4" Grid.Column="2"
                Style="{StaticResource TextBlockNormalStyle}"
                HorizontalAlignment="Right"
				Text="Đến"
			/>
            <IControls:RadDatePicker
				x:Name="txtDateOfBirthTo"
				Grid.Row="4" Grid.Column="3"
                Style="{StaticResource TelerikDatePickerNormalStyle}"
				SelectedDate="{Binding Path=EmployeeCriteria.DateOfBirthTo, Mode=TwoWay,ValidatesOnDataErrors = true}"
			/>

            <!--btnSearch-->
            <Controls:SearchButtonControl 
			    Grid.Column="4" Grid.Row="5"/>
        </Grid>
    </Groupbox:GroupBox>
</UserControl>
